/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  const auth = middleware.auth();
  router.get('/', controller.home.index);

  router.post('/users/login', controller.user.login);
  router.get('/users/logout', auth, controller.user.logout);
  router.get('/news/getNewsByUser', auth, controller.news.getNewsByUser);
};
